<?php
class TestAction extends Action {
	public function insertcitymap(){
		for($i=1;$i<2;$i++){
			$map = D('Citymap');
			$map->cid = rand(1,14);
			$map->x = rand(1,10);
			$map->y = rand(1,10);
			$map->price = rand(1,10);
			$map->belongscid = 1;
			$map->canwalk = 1;
			$map->beijingtu = "123";
			$map->add();
		}
		$this->display();
	}

	public function index(){
		$mapx = array('1'=>1,'2'=>1,);
		$mapy = array('1'=>1,'2'=>2,);
		$mapbeijing = array('1'=>1.1,'2'=>1.2,);
		
		$this->assign('mapx',$mapx);
		$this->assign('mapy',$mapy);
		$this->assign('mapbeijing',$mapbeijing);
		//$this->ajaxReturn('1','2',3);
		$this->display();
	}
	
	public function haha(){
		$vo = $_POST['textfield'];
		$this->ajaxReturn($vo,'2',1);
	}
	
	
}
?>
